<?php
header('Content-Type:text/html;charset=gbk');  

$page = 870;

// 设计师id数组
$designer_id_array = [];

for ($i = 1; $i <= $page ; $i++) { 
	$url = "https://zxn.taobao.com/wei_template_list.htm?p=$i";
	// 取出目标页面的html
	$html = file_get_contents($url);
	// var_dump($html);
	// 正则表达式取出设计师id号
	$start = "\/\/zxn.taobao.com\/designer_detail\.htm\?designerId=";
	$end = "\">";
	preg_match_all("/$start(\d+)$end/", $html, $matches);
	// var_dump($matches[1]);
	$designer_id_array = array_merge($designer_id_array, $matches[1]);
}

$designer_id_array = array_unique($designer_id_array);

echo 'size:' . sizeof($designer_id_array);